import { Layout } from "antd";
import Aside from "../Aside";
import Header from "../Header";
import Content from "../Content";
import { useEffect } from "react";
import type { ReactElement } from 'react'
import { getConfigAsync } from "@/store/app/appSlice";
import { useAppDispatch } from "@/store/hooks";


export default function Admin():ReactElement {

  const dispatch = useAppDispatch()

  useEffect(()=>{
    dispatch(getConfigAsync({}))
  }, [])

  return (
    <Layout>
      <Aside />
      <Layout>
        <Header />
        <Content />
      </Layout>
    </Layout>
  );
}
